/**
 * @author 江黎
 * @date 2021/11/20 11:56
 */
public class SonDemo extends FatherDemo {

    static {
        number = 4;
        System.out.println("son static{}");
    }

    public SonDemo() {
        System.out.println("son constructor()");
    }

    public static void main(String[] args) {
        // 构造方法调用后才会执行,类加载的初始化阶段不能自动执行
        new SonDemo();
        System.out.println(number);
    }
}
